package ge.telasi.tasks.model;

/**
 * @author dimitri
 */
public abstract class CopyService<T> {

    public abstract T createClone(T proto);

    protected String copyString(String string) {
        if (string != null) {
            return new String(string);
        } else {
            return null;
        }
    }

    protected void copyModifiable(Modifiable orig, Modifiable dest) {
        dest.setActive(orig.isActive());
        dest.setCreated(orig.getCreated());
        dest.setModified(orig.getCreated());
    }

}
